package com.yuelao.yuelao_backend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("user_stakings")
public class UserStaking implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long userId;
    private Long poolId; // 挖矿池ID
    private BigDecimal stakedAmount; // 质押金额
    private BigDecimal earnedRewards; // 已赚取奖励
    private LocalDateTime stakeTime;
    private LocalDateTime lastClaimTime;
    private String status; // 'active', 'unstaked'
}